package view.plugin
{
	//等待提示
	
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.text.TextField;
	
	import flash3.framework.Singleton;
	
	import global.Resource;
	import global.Define;
	
	public class LoaderView extends PanelBase
	{
		private var textField:TextField = null;
		private var main:MovieClip = null;
		public function LoaderView()
		{
			super();
			
			main = Resource.i.getMovieClip("common", "LoadingCircle");
			textField = main.txtMessage;
			textField.text = "";
			addChild(main);
		}
		
		override public function onAddToStage(evt:Event):void
		{
			this.removeEventListener(Event.ADDED_TO_STAGE, onAddToStage);
			this.x = 405;
			this.y = (Define.SCREEN_HEIGHT - main.height) / 2;
		}
		
		public function set text(messgae:String):void
		{
			textField.text = messgae;
		}
		
		static public function get i():LoaderView
		{
			return Singleton.getInstanceOrCreate(LoaderView) as LoaderView;
		}
	}
}